package cn.czh.controller;

import cn.czh.domain.Middle;
import cn.czh.service.IMiddleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MiddleController {
    @Autowired
    private IMiddleService middleService;

    @GetMapping("/middle/loadById/{id}")
    public Middle loadById(@PathVariable("id") Long id){
        return middleService.loadById(id);
    }
}
